package com.github.m6d21.sso.dao.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.m6d21.sso.model.role.dto.RolePermissionDTO;
import com.github.m6d21.sso.model.role.entity.Role;
import com.github.m6d21.sso.model.role.qo.RolePermissionQO;
import com.github.m6d21.sso.model.role.vo.UnionRole;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 *<p>
 *UserMapper
 *</p>
 *
 * @author liuyang
 * @date 2018-12-05 Wed 22:11:00
 * @since 1.0.0
 */
@Mapper
public interface UnionRoleMapper extends BaseMapper<Role> {

    List<UnionRole> unionQuery(RolePermissionQO rolePermissionQO);

    int insertRolePermissionRelation(RolePermissionDTO rolePermissionDTO);

    int insertBatchRolePermissionRelation(List<RolePermissionDTO>list);

    int deleteBatchRolePermissionRelation(@Param("roleId") Integer roleId, @Param("permissionIds") List<Integer> permissionIds);
}
